<template>
    <div>
        <my-swipe :imgList="imgList" class="mySwipe"></my-swipe>
    </div>
    <div>
        <submenu :menus="menuList"></submenu>
    </div>
    <div>
        <hot-goods :goodsList="goodsList"></hot-goods>
    </div>
</template>
    <script setup>
    import { getImgs, getGoodsList } from '@/api/index.js'
    import { onMounted, ref } from 'vue'
    import mySwipe from '@/components/swiper.vue'
    import hotGoods from '@/components/hotgoods.vue'
    const imgList = ref()
    const goodsList = ref()
    onMounted(async () => {
    const res = await getImgs()
    const res2 = await getGoodsList()
    imgList.value = res.data
    goodsList.value = res2.data
    })
    const menuList = [
        { name: '新闻资讯', pos: [-96, -121] },
        { name: '图⽚分享', pos: [-312, -121] },
        { name: '商品购买', pos: [-96, -327] },
        { name: '留⾔反馈', pos: [-96, -527] },
        { name: '视频专区', pos: [-312, -732] },
        { name: '联系我们', pos: [-312, -527] }
    ]
    </script>
    <style lang="scss" scoped>
    </style>